home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / printers.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  5.4 KB  |  136 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'Printers.pas' rev: 3.00
  6.  
  7. #ifndef PrintersHPP
  8. #define PrintersHPP
  9. #include <Forms.hpp>
  10. #include <Graphics.hpp>
  11. #include <Classes.hpp>
  12. #include <SysUtils.hpp>
  13. #include <WinSpool.hpp>
  14. #include <Windows.hpp>
  15. #include <SysInit.hpp>
  16. #include <System.hpp>
  17.  
  18. //-- user supplied -----------------------------------------------------------
  19.  
  20. namespace Printers
  21. {
  22. //-- type declarations -------------------------------------------------------
  23. class DELPHICLASS EPrinter;
  24. class PASCALIMPLEMENTATION EPrinter : public Sysutils::Exception 
  25. {
  26.     typedef Sysutils::Exception inherited;
  27.     
  28. public:
  29.     /* Exception.Create */ __fastcall EPrinter(const System::AnsiString Msg) : Sysutils::Exception(Msg)
  30.          { }
  31.     /* Exception.CreateFmt */ __fastcall EPrinter(const System::AnsiString Msg, const System::TVarRec * 
  32.         Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  33.     /* Exception.CreateRes */ __fastcall EPrinter(int Ident, Extended Dummy) : Sysutils::Exception(Ident
  34.         , Dummy) { }
  35.     /* Exception.CreateResFmt */ __fastcall EPrinter(int Ident, const System::TVarRec * Args, const int 
  36.         Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
  37.     /* Exception.CreateHelp */ __fastcall EPrinter(const System::AnsiString Msg, int AHelpContext) : Sysutils::
  38.         Exception(Msg, AHelpContext) { }
  39.     /* Exception.CreateFmtHelp */ __fastcall EPrinter(const System::AnsiString Msg, const System::TVarRec 
  40.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
  41.         ) { }
  42.     /* Exception.CreateResHelp */ __fastcall EPrinter(int Ident, int AHelpContext) : Sysutils::Exception(
  43.         Ident, AHelpContext) { }
  44.     /* Exception.CreateResFmtHelp */ __fastcall EPrinter(int Ident, const System::TVarRec * Args, const 
  45.         int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext) { }
  46.     
  47. public:
  48.     /* TObject.Destroy */ __fastcall virtual ~EPrinter(void) { }
  49.     
  50. };
  51.  
  52. enum TPrinterState { psNoHandle, psHandleIC, psHandleDC };
  53.  
  54. enum TPrinterOrientation { poPortrait, poLandscape };
  55.  
  56. enum TPrinterCapability { pcCopies, pcOrientation, pcCollation };
  57.  
  58. typedef Set<TPrinterCapability, pcCopies, pcCollation>  TPrinterCapabilities;
  59.  
  60. class DELPHICLASS TPrinter;
  61. class PASCALIMPLEMENTATION TPrinter : public System::TObject 
  62. {
  63.     typedef System::TObject inherited;
  64.     
  65. private:
  66.     Graphics::TCanvas* FCanvas;
  67.     Classes::TStrings* FFonts;
  68.     int FPageNumber;
  69.     Classes::TStrings* FPrinters;
  70.     int FPrinterIndex;
  71.     System::AnsiString FTitle;
  72.     bool FPrinting;
  73.     bool FAborted;
  74.     TPrinterCapabilities FCapabilities;
  75.     TPrinterState State;
  76.     HDC DC;
  77.     _devicemodeA *DevMode;
  78.     int DeviceMode;
  79.     int FPrinterHandle;
  80.     void __fastcall SetState(TPrinterState Value);
  81.     Graphics::TCanvas* __fastcall GetCanvas(void);
  82.     int __fastcall GetNumCopies(void);
  83.     Classes::TStrings* __fastcall GetFonts(void);
  84.     HDC __fastcall GetHandle(void);
  85.     TPrinterOrientation __fastcall GetOrientation(void);
  86.     int __fastcall GetPageHeight(void);
  87.     int __fastcall GetPageWidth(void);
  88.     int __fastcall GetPrinterIndex(void);
  89.     void __fastcall SetPrinterCapabilities(int Value);
  90.     void __fastcall SetPrinterIndex(int Value);
  91.     Classes::TStrings* __fastcall GetPrinters(void);
  92.     void __fastcall SetNumCopies(int Value);
  93.     void __fastcall SetOrientation(TPrinterOrientation Value);
  94.     void __fastcall SetToDefaultPrinter(void);
  95.     void __fastcall CheckPrinting(bool Value);
  96.     void __fastcall FreePrinters(void);
  97.     void __fastcall FreeFonts(void);
  98.     
  99. public:
  100.     __fastcall TPrinter(void);
  101.     __fastcall virtual ~TPrinter(void);
  102.     void __fastcall Abort(void);
  103.     void __fastcall BeginDoc(void);
  104.     void __fastcall EndDoc(void);
  105.     void __fastcall NewPage(void);
  106.     void __fastcall GetPrinter(char * ADevice, char * ADriver, char * APort, int &ADeviceMode);
  107.     void __fastcall SetPrinter(char * ADevice, char * ADriver, char * APort, int ADeviceMode);
  108.     __property bool Aborted = {read=FAborted, nodefault};
  109.     __property Graphics::TCanvas* Canvas = {read=GetCanvas};
  110.     __property TPrinterCapabilities Capabilities = {read=FCapabilities, nodefault};
  111.     __property int Copies = {read=GetNumCopies, write=SetNumCopies, nodefault};
  112.     __property Classes::TStrings* Fonts = {read=GetFonts};
  113.     __property HDC Handle = {read=GetHandle, nodefault};
  114.     __property TPrinterOrientation Orientation = {read=GetOrientation, write=SetOrientation, nodefault}
  115.         ;
  116.     __property int PageHeight = {read=GetPageHeight, nodefault};
  117.     __property int PageWidth = {read=GetPageWidth, nodefault};
  118.     __property int PageNumber = {read=FPageNumber, nodefault};
  119.     __property int PrinterIndex = {read=GetPrinterIndex, write=SetPrinterIndex, nodefault};
  120.     __property bool Printing = {read=FPrinting, nodefault};
  121.     __property Classes::TStrings* Printers = {read=GetPrinters};
  122.     __property System::AnsiString Title = {read=FTitle, write=FTitle};
  123. };
  124.  
  125. //-- var, const, procedure ---------------------------------------------------
  126. extern PACKAGE void __fastcall AssignPrn(System::TextFile &F);
  127. extern PACKAGE TPrinter* __fastcall Printer(void);
  128. extern PACKAGE TPrinter* __fastcall SetPrinter(TPrinter* NewPrinter);
  129.  
  130. }    /* namespace Printers */
  131. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  132. using namespace Printers;
  133. #endif
  134. //-- end unit ----------------------------------------------------------------
  135. #endif    // Printers
  136.